import request from '../utils/request'

// 获取用户列表
export const getUserList = (data:any) =>request({
    url:'http://localhost:8888/mock/userdetail',
    method:'POST',
    data,
})


// 获取订单记录
export const getorderDetail = (data:any) =>request({
    url:'http://localhost:8888/mock/user-orderhistory',
    method:'POST',
    data,
})

// 获取配送记录
export const getdistributionDetail = (data:any) =>request({
    url:'http://localhost:8888/mock/user-distributionhistory',
    method:'POST',
    data,
})


// 获取配送记录
export const getTimeRecord = (data:any) =>request({
    url:'http://localhost:8888/mock/timerecord',
    method:'POST',
    data,
})

// 修改用户信息
export const editUserInfo = (info:any): Promise<ResponseData> =>request({
    url:'http://localhost:8888/mock/edituser',
    method:'POST',
    data:info,
})

//体重
export const getWeight = (page=1)=>request({
    url: 'http://localhost:8888/mock/weight',
    method:'POST',
    data:page,
})

//提现
export const getWithdrawal = (page=1)=>request({
    url: 'http://localhost:8888/mock/withdrawal',
    method:'POST', 
    data:page,
})
//优惠券
export const getUserCoupon = (page=1)=>request({
    url: 'http://localhost:8888/mock/usercoupon',
    method:'POST',
    data:page,
})

//充值
export const getRecharge = (page=1)=>request({
    url: 'http://localhost:8888/mock/recharge',
    method:'POST',
    data:page,
})
//配送
export const getDelivery = (page=1)=>request({
    url: 'http://localhost:8888/mock/delivery',
    method:'POST',
    data:page,
})